This application is based on and incorporates herein by reference Japanese Patent Application No. 11-339993 filed on Nov. 30, 1999.
The present invention relates to an electronic control apparatus for controlling a control object by starting individual programs periodically.
Conventional electronic control apparatuses for controlling a control object (for instance, engine) execute control processing for the control object by executing various processing (for instance, calculation processing and actuator drive processing) at every fixed timing synchronized with operation of the control object (for instance, timing synchronized with a crankshaft rotation of an internal combustion engine). Specifically, a control program for controlling the control object comprises a plurality of individual programs divided based on the contents of control processing. The apparatus starts execution of the individual processing programs at predetermined timings, based on a start processing program which controls timings of retrieving the individual processing programs (that is, starting of execution of the individual processing programs).
Some of the electronic control apparatuses are constructed to be operable in different operation modes in addition to a normal mode for normally controlling the drive of the control object. Such different modes include an inspection mode for inspecting failure in electronic components and wiring patterns of the electronic control apparatus, a rewrite mode for rewriting programs of the electronic control apparatus, and the like.
In those special modes other than the normal mode, it is not necessary to retrieve all the individual processing programs used in the normal mode. The electronic control apparatus results in performing unnecessary operations, if it executes the processing based on all the individual processing programs (that is, all of the individual processing programs necessary for the normal mode) in the same manner as in the normal mode.
The conventional apparatus therefore is constructed to check whether the present operation mode is the normal mode in the processing of each individual processing program immediately after starting its operation. The apparatus executes the normal processing if the check result indicates the normal mode. However, the apparatus inhibits the execution of subsequent processing to prevent the above problem, if the check result indicates the special mode. For instance, an injector drive processing for driving a fuel injector provided in an internal combustion engine is programmed as shown in FIG. 6, as one of the individual processing programs. As shown in FIG. 6, the apparatus first checks at step S500 the operation mode at that time (present time), when the injector drive processing is started at a predetermined timing. If it is the normal mode (S500: YES), the apparatus executes at step S510 the processing for driving the injector (operation to supply drive current to the injector). If it is not the normal mode (S500: NO), the apparatus terminates the injector drive processing without executing the subsequent processing (processing of S510 in this instance).
According to the above construction, however, the execution of the individual processing programs are started at the respective timings irrespective of the operation mode of the electronic control apparatus. The electronic control apparatus thereafter checks the operation mode in each execution of the individual processing programs even when it is in the normal mode. Thus, efficiency of control processing for the control object is lessened.
The present invention therefore has an objective to improve efficiency of processing in an electronic control apparatus for controlling a control object.
According to the present invention, an electronic control apparatus is constructed to check its operation mode, that is, normal mode or other mode, before each individual processing program is retrieved for execution of the program. Retrieval of the individual processing program unnecessary for a specified one of the operation modes is inhibited. It is thus unnecessary to make the mode check in each execution of the individual processing programs. Thus, the control processing for the control object can be executed efficiently.